package com.ysd.lis.entity.eq;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ysd.lis.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Timestamp;
import java.util.List;

/**
 * <p>
 * 设备管理-设备类型
 * </p>
 *
 * @author prs
 * @since 2024-08-05
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("EQ_MAINTAIN_ORDER")
public class EqMaintainOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 保养单号
     */
    @TableField("MAINTAIN_NO")
    private String maintainNo;

    /**
     * 设备id
     */
    @TableField("EQUIPT_ID")
    private String equiptId;

    /**
     * 设备编码
     */
    @TableField("EQUIPT_CODE")
    private String equiptCode;

    /**
     * 保养类型
     */
    @TableField("MAINTAIN_TYPE")
    private String maintainType;

    /**
     * 保养状态：0待保养，5保养中，10待验证，15已完成
     */
    @TableField("MAINTAIN_STATUS")
    private String maintainStatus;
    @TableField(exist = false)
    private Integer maintainStatusCnt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private Timestamp startDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private Timestamp endDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @TableField(fill = FieldFill.UPDATE)
    private Timestamp planDate;

    /**
     * 保养工时
     */
    @TableField("WORK_HOURS")
    private Integer workHours;


    /**
     * 保养费用
     */
    @TableField("MAINTAIN_FEE")
    private String maintainFee;

    /**
     * 备注
     */
    @TableField("REMARK")
    private String remark;

    /**
     * 序号
     */
    @TableField("SEQ")
    private Integer seq;

    /**
     * 计划id
     */
    @TableField("PLAN_ID")
    private String planId;

    /**
     * 计划单号
     */
    @TableField("PLAN_NO")
    private String planNo;


    @TableField(exist = false)
    private String equiptName;
    @TableField(exist = false)
    private String specification;
    @TableField(exist = false)
    private long overdue;

    @TableField(exist = false)
    private List<EqMaintainPerson> maintainPersonList;
    @TableField(exist = false)
    private List<EqMaintainDetail> maintainDetailList;

}
